Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Conversation

@Matthieu-OD
Copy link
Contributor

@Matthieu-OD Matthieu-OD commented Dec 13, 2024

To test

  • get or create or get prompt version or prompt lineage where the prompt lineage has been deleted which means that the value of the field deletedAt is not null

after adding the dev version of the repo as a dependency you can use this code to test it

from literalai import LiteralClient

literalai_client = LiteralClient(
    url="http://localhost:3000", api_key="my-initial-api-key"
)

def get_prompt():
    prompt = literalai_client.api.get_prompt(name="Default", version=2)
    prompt2 = literalai_client.api.get_or_create_prompt(
        name="Default", template_messages=[]
    )
    prompt_lineage = literalai_client.api.get_or_create_prompt_lineage(name="Default")
    print("prompt", prompt)
    print("prompt2", prompt2)
    print("prompt lineage", prompt_lineage)

if __name__ == "__main__":
    get_prompt()

@Matthieu-OD Matthieu-OD force-pushed the matt/eng-2178-allow-prompt-deletion branch from 6f5150e to accecf0 Compare December 16, 2024 13:44
@Matthieu-OD Matthieu-OD force-pushed the matt/eng-2178-allow-prompt-deletion branch from 37b2b82 to f66e151 Compare December 19, 2024 17:46
@Matthieu-OD Matthieu-OD force-pushed the matt/eng-2178-allow-prompt-deletion branch from f66e151 to c9f7514 Compare December 19, 2024 17:48
@Matthieu-OD Matthieu-OD marked this pull request as ready for review December 19, 2024 17:56
@willydouhard willydouhard merged commit 9608e6c into main Jan 9, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants